declare global {
    interface System {
      import (request: string): Promise<any>
    }
    var System: System
}

import main from '../views/main.vue'
export const locking = {
    path: '/locking',
    name: '锁定',
    component: () => import('../components/lockscreen/components/locking-page.vue')
};
export const loginRouter = {
    path: '/',
    name: 'login',
    meta: {
        title: '登陆'
    },
    component:()=>import('../views/login.vue')
};
export const otherRouters={
    path:'/main',
    name:'main',
    permission:'',
    meta:{title:'ManageMenu'},
    component:main,
    children:[
        {path: 'home', meta:{title:'首页'}, name: 'home', component:()=>import('../views/home/home.vue')}
    ]
}
export const appRouters=[
    {
        path:'/setting',
        name:'setting',
        permission:'',
        meta:{title:'管理员'},
        icon:'ios-people',
        component:main,
        children:[
            {path: 'user',permission:'Pages.Users', meta:{title:'管理员管理'}, name: 'user', component:()=>import('../views/setting/user/user.vue')},
            {path: 'role',permission:'Pages.Roles', meta:{title:'角色管理'}, name: 'role', component:()=>import('../views/setting/role/role.vue')},
            {path: 'personalcenter', meta:{title:'个人中心'}, name: 'perosonal-center', component:()=>import('../views/setting/user/personal-center.vue')},
            {path: 'tenant',permission:'Pages.Tenantss', meta:{title:'租户'}, name: 'tenant', component:()=>import('../views/setting/tenant/tenant.vue')}
        ]
    }, 
    {
        path:'/mall',
        name:'mall',
        permission:'',
        meta:{title:'商城'},
        icon:'ios-cart',
        component:main,
        children:[
            {path: 'commoditymanager',permission:'Administration.CommodityManagement', meta:{title:'管理商品'}, name: 'commodity-manager', component:()=>import('../views/mall/commodity-manager.vue')},
            //{path: 'test',permission:'Administration.CommodityManagement', meta:{title:'test'}, name: 'test', component:()=>import('../views/mall/test.vue')},
        ]
    }, 
    {
        path:'/member',
        name:'member',
        permission:'',
        meta:{title:'会员'},
        icon:'ios-person',
        component:main,
        children:[
            {path: 'membermanager',permission:'Administration.MemberManagement', meta:{title:'会员管理'}, name: 'member-manager', component:()=>import('../views/member/member-manager.vue')},
            //{path: 'test',permission:'Administration.CommodityManagement', meta:{title:'test'}, name: 'test', component:()=>import('../views/mall/test.vue')},
        ]
    }, 
    {
        path:'/order',
        name:'order',
        permission:'',
        meta:{title:'订单'},
        icon:'ios-paper',
        component:main,
        children:[
            {path: 'ordermanager',permission:'Administration.OrderManagement', meta:{title:'管理订单'}, name: 'order-manager', component:()=>import('../views/order/order-manager.vue')},
        ]
    },
    {
        path:'/website',
        name:'website',
        permission:'',
        meta:{title:'网站管理'},
        icon:'ios-home',
        component:main,
        children:[
            {path: 'resourcemanager',permission:'Administration.ResourceManagement', meta:{title:'资源库'}, name: 'resource-manager', component:()=>import('../views/website/resource-manager.vue')},
            {path: 'companyinformation',permission:'Administration.ArticleManagement', meta:{title:'公司资讯'}, name: 'company-information', component:()=>import('../views/website/article/company-information.vue')},
            {path: 'notice',permission:'Administration.ArticleManagement', meta:{title:'企业通知'}, name: 'notice', component:()=>import('../views/website/article/notice.vue')},
            {path: 'microclassroom',permission:'Administration.ArticleManagement', meta:{title:'微课堂'}, name: 'micro-classroom', component:()=>import('../views/website/article/micro-classroom.vue')},
            {path: 'columnarticlemanager',permission:'Administration.WebsiteInfoManagement', meta:{title:'栏目文章管理'}, name: 'column-article-manager', component:()=>import('../views/website/column-article-manager.vue')},
            {path: 'friendlylinkmanager',permission:'Administration.WebsiteInfoManagement', meta:{title:'友情链接管理'}, name: 'friendlylink-manager', component:()=>import('../views/website/friendlylink-manager.vue')},
            {path: 'advertisementmanager',permission:'Administration.WebsiteInfoManagement', meta:{title:'宣传图片管理'}, name: 'advertisement-manager', component:()=>import('../views/website/advertisement-manager.vue')},
            {path: 'companyinfomanager',permission:'Administration.WebsiteInfoManagement', meta:{title:'企业信息'}, name: 'company-info-manager', component:()=>import('../views/website/company-info-manager.vue')},
            {path: 'websiteinfomanager',permission:'Administration.WebsiteInfoManagement', meta:{title:'网站信息'}, name: 'website-info-manager', component:()=>import('../views/website/website-info-manager.vue')},
            {path: 'feedbackmanager',permission:'Administration.FeedbackManagement', meta:{title:'留言管理'}, name: 'feedback-manager', component:()=>import('../views/website/feedback-manager.vue')},
        ]
    }, 
    {
        path:'/commoditysetting',
        name:'commodity-setting',
        permission:'',
        meta:{title:'商品设置'},
        icon:'logo-dropbox',
        component:main,
        children:[
            {path: 'commodityclassmanager',permission:'Administration.CommodityClassManagement', meta:{title:'商品分类'}, name: 'commodity-class-manager', component:()=>import('../views/setting/commodity/commodity-class-manager.vue')},
            {path: 'commoditywaremanager',permission:'Administration.CommodityWareManagement', meta:{title:'商品库管理'}, name: 'commodity-ware-manager', component:()=>import('../views/setting/commodity/commodity-ware-manager.vue')},
            {path: 'commodityshoppingoptionmanager',permission:'Administration.CommodityShoppingOptionManagement', meta:{title:'购物选项管理'}, name: 'commodity-shopping-option-manager', component:()=>import('../views/setting/commodity/commodity-shopping-option-manager.vue')},
            {path: 'commodityguaranteemanager',permission:'Administration.CommodityGuaranteeManagement', meta:{title:'商品保证管理'}, name: 'commodity-guarantee-manager', component:()=>import('../views/setting/commodity/commodity-guarantee-manager.vue')},
        ]
    }, 
    {
        path:'/mallsetting',
        name:'mall-setting',
        permission:'',
        meta:{title:'商城设置'},
        icon:'md-settings',
        component:main,
        children:[
            {path: 'mallgeneralmanager',permission:'Administration.MallGeneralManagement', meta:{title:'常规设置'}, name: 'mall-general-manager', component:()=>import('../views/setting/mall/mall-general-setting.vue')},
            {path: 'shipmanager',permission:'Administration.ShipManagement', meta:{title:'配送设置'}, name: 'ship-manager', component:()=>import('../views/setting/mall/ship-manager.vue')},
            {path: 'paymentmanager',permission:'Administration.PaymentManagement', meta:{title:'支付设置'}, name: 'payment-manager', component:()=>import('../views/setting/mall/payment-manager.vue')},
        ]
    }, 
    {
        path:'/marketing',
        name:'marketing',
        permission:'',
        meta:{title:'营销'},
        icon:'ios-ice-cream',
        component:main,
        children:[
            {path: 'couponmanager',permission:'Administration.CouponManagement', meta:{title:'优惠券管理'}, name: 'coupon-manager', component:()=>import('../views/setting/marketing/coupon-manager.vue')},
            {path: 'salespromotionnmanager',permission:'Administration.SalesPromotionManagement', meta:{title:'限时活动管理'}, name: 'salespromotion-manager', component:()=>import('../views/setting/marketing/salespromotion-manager.vue')},
        ]
    }, 
]
export const routers = [
    loginRouter,
    locking,
    ...appRouters,
    otherRouters
];
